home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-13 / me_cd22.zip / MUTT2.ZIP / REQUIRE.MUT < prev    next >
Text File  |  1992-04-27  |  750b  |  22 lines

  1. ;; require.mut : Lisp like require.  This code lets Mutt programs require
  2. ;;   that certain modules be loaded.
  3. ;; To use:  In the MAIN rouine of your program file, add
  4. ;;   (require Mutt-module-needed-by-this-program)
  5. ;;   (for example (require "foo.mut") or (require "foo")) and when your
  6. ;;   program is loaded it will load foo.mco if it hasn't been already.
  7. ;; Notes:
  8. ;;   It would be a good idea to be able to (require "foo" "bar" ...)
  9. ;; C Durland  10/89  redone 9/91    Public Domain
  10.  
  11. (defun
  12.   require (string Mutt-code-file)
  13.   {
  14.     (arg-prefix 42)            ;; secret code to maybe load
  15.     (if (not (load Mutt-code-file))    ;; if can't load code
  16.       {
  17.         (msg "require: Could not load " Mutt-code-file)
  18.     (halt)
  19.       })
  20.   }
  21. )
  22.